<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css"  href="/styles/general.css"/>
<link rel="stylesheet" type="text/css" href="/styles/main.css"/>
<link rel="stylesheet" type="text/css" href="/styles/validator.css"/>
<script src="/js/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="/js/formValidator.js" type="text/javascript"></script>
<script src="/js/formValidatorRegex.js" type="text/javascript"></script>
<script src="/js/json2.js" type="text/javascript"></script>
<script type="text/javascript"> 
$(document).ready(function(){
	$.formValidator.initConfig({formid:"myform",onerror:function(msg){alert(msg)}});
	$("#username").formValidator({onshow:"请输入用户名",onfocus:"请至少要输入1个字符",oncorrect:"OK",defaultvalue:""}).inputValidator({min:1,onerror:"长度不正确,请确认"});
	$("#password").formValidator({onshow:"请输入密码",onfocus:"请至少要输入1个字符",oncorrect:"OK",defaultvalue:""}).inputValidator({min:1,onerror:"长度不正确,请确认"});
	$("#email").formValidator({onshow:"请输入邮件地址",onfocus:"请至少要输入1个字符",oncorrect:"OK",defaultvalue:""}).inputValidator({min:1,onerror:"长度不正确,请确认"});
	$("#realname").formValidator({onshow:"请输入姓名",onfocus:"请至少要输入1个字符",oncorrect:"OK",defaultvalue:""}).inputValidator({min:1,onerror:"长度不正确,请确认"});
	$("#tel").formValidator({onshow:"请输入电话",onfocus:"请至少要输入1个字符",oncorrect:"OK",defaultvalue:""}).inputValidator({min:1,onerror:"长度不正确,请确认"});
	$("#spid").bind('change', function(event) {
	  $.getJSON("/admin/adminjson/deptid/"+$(this).attr("value"),function(JSON){  
        $("#leaderid").empty();  
        $.each(JSON,function(i,n){ 
            $("<option value="+i+">"+n+"</option>").appendTo("#leaderid");  
        });  
      });  
	});
	$("#spid").trigger('change');
});
function go(){
	var fo = $("#myform").serializeArray();
	var s = JSON.stringify(fo);
	opener.jsonsearch(s);
	self.close();
}
</script>
<title></title>
</head>
<body>
<div class="main-div">
  <form action="/admin/add/" method="post" name="myform" id="myform" enctype="multipart/form-data">
  <table width="100%" id="table_form">
       <tr>
        <td class="label">项目名称：</td>
        <td>
			{form text * projectname projectname}
        </td>
      </tr>
       <tr>
        <td class="label">项目编号：</td>
        <td>
			{form text * projectid projectid}
        </td>
      </tr>
      <tr>
        <td class="label">客户名称：</td>
        <td>
			{form text * customername customername}
        </td>
      </tr>
       <tr>
        <td class="label">客户代码：</td>
        <td>
			{form text * customercode customercode}
        </td>
      </tr>
      <tr>
        <td class="label">项目负责部门：</td>
        <td>
			{form text * department department}
        </td>
      </tr>
       <tr>
        <td class="label">项目负责人：</td>
        <td>
			{form text * dutyperson dutyperson}
        </td>
      </tr>
       <tr>
        <td class="label">立项时间：</td>
        <td>
			{form text * createdate createdate}
        </td>
      </tr>
      </table>  
   <div class="button-div">
        <input type="submit" onclick="go();return false;" value="&nbsp;检&nbsp;索&nbsp;" />
        &nbsp;&nbsp;&nbsp;&nbsp;
        <input type="reset" value="&nbsp;重&nbsp;置&nbsp;" />
   </div>
  </form>
</div>
</body>
</html>
